home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / u_man / cat1 / cpuset.z / cpuset
Encoding:
Text File  |  2002-10-03  |  13.1 KB  |  265 lines

  1.  
  2.  
  3.  
  4. ccccppppuuuusssseeeetttt((((1111))))                                                            ccccppppuuuusssseeeetttt((((1111))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ccccppppuuuusssseeeetttt, mmmmiiiisssseeeerrrr____ccccppppuuuusssseeeetttt - define and manage a set of CPUs
  10.  
  11. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.      ccccppppuuuusssseeeetttt    [-q _c_p_u_s_e_t__n_a_m_e[,_c_p_u_s_e_t__n_a_m_e__d_e_s_t] [-A _c_o_m_m_a_n_d]
  13.                |[-c -f _f_i_l_e_n_a_m_e]|[-d]|[-i]|[-l]|[-m]|[-M]|[-Q]|[-p]
  14.                |[-T]] | -C | -Q | -h
  15.  
  16. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.      The _cccc_pppp_uuuu_ssss_eeee_tttt command is used to create and destroy cpusets, to retrieve
  18.      information about existing cpusets, and to attach a process and all of
  19.      its children to a cpuset.
  20.  
  21.      A cpuset is a named set of CPUs, which may be defined to be restricted or
  22.      open.  A restricted cpuset only allows processes that are members of the
  23.      cpuset to run on the set of CPUs.  An open cpuset allows any process to
  24.      run on its cpus, but a process that is a member of the cpuset can only
  25.      run on the CPUs belonging to the cpuset.
  26.  
  27.      A cpuset is defined by a cpuset configuration file and a name.  See
  28.      _cccc_pppp_uuuu_ssss_eeee_tttt(4) for a definition of the file format.  The cpuset configuration
  29.      file is used to list the CPUs that are members of the cpuset.  It also
  30.      contains any additional parameters required to define the cpuset.  A
  31.      cpuset name is between three and eight characters long; names of two or
  32.      less characters are reserved.
  33.  
  34.      The file permissions of the configuration file define access to the
  35.      cpuset. When permissions need to be checked, the current permissions of
  36.      the file are used.  It is therefore possible to change access to
  37.      particular cpuset without having to tear it down and recreate it, simply
  38.      by changing the access permissions.  Read access allows a user to
  39.      retrieve information about a cpuset while execute permission allows the
  40.      user to attach a process to the cpuset.
  41.  
  42.      Cpusets on IRIX requires two user classes:  root and user. The root class
  43.      creates, destroys, moves a process, and adds a process to the cpuset. The
  44.      user class is governed by the file permissions of the configuration file
  45.      for the given cpuset.
  46.  
  47.      Given a configuration file with the following characteristics:
  48.  
  49.           Permissions     Owner   Group   Size    Filename
  50.           --------------------------------------------------
  51.  
  52.           -rwxr-----      root    cpuset  512     cpuset.test
  53.  
  54.      Group read permission allows a user belonging to the group cpuset to list
  55.      all cpusets in the cpuset defined by the _cccc_pppp_uuuu_ssss_eeee_tttt_...._tttt_eeee_ssss_tttt file and get a
  56.      listing of all processes in this cpuset.  In order for the user to add
  57.      processes to the cpuset governed by the _cccc_pppp_uuuu_ssss_eeee_tttt_...._tttt_eeee_ssss_tttt  file, you would need
  58.      to change the permissions as follows:
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ccccppppuuuusssseeeetttt((((1111))))                                                            ccccppppuuuusssseeeetttt((((1111))))
  71.  
  72.  
  73.  
  74.           Permissions     Owner   Group   Size    Filename
  75.           --------------------------------------------------
  76.  
  77.           -rwxr-x---      root    cpuset  512     cpuset.test
  78.  
  79.  
  80.      In a Trusted IRIX environment, permissions are governed by the
  81.      _////_eeee_tttt_cccc_////_cccc_aaaa_pppp_aaaa_bbbb_iiii_llll_iiii_tttt_yyyy file.  See the _cccc_aaaa_pppp_aaaa_bbbb_iiii_llll_iiii_tttt_yyyy(4) and _cccc_aaaa_pppp_aaaa_bbbb_iiii_llll_iiii_tttt_iiii_eeee_ssss(4) man
  82.      pages for more information on the capability mechanism that provides fine
  83.      grained control over the privileges of a process.  Each user in the
  84.      capability file has a set of minimum and maximum permissions.
  85.      Consequently, root does not have any special abilities except to be able
  86.      to use suattr so that it may assume any capabilities and permissions.
  87.      Capabilities and permissions are also narrowed by the use of mandatory
  88.      access control (MAC) labels and access control lists (ACLs).
  89.  
  90.      In Trusted IRIX, to allow a user belonging to the group cpuset to list
  91.      all cpusets in the cpuset defined by the _cccc_pppp_uuuu_ssss_eeee_tttt_...._tttt_eeee_ssss_tttt file and get a
  92.      listing of all processes in this cpuset, you must perform the following:
  93.  
  94.      +o   Assign the user with a MAC label of userlow.
  95.  
  96.      +o   Make the following entry in the _////_eeee_tttt_cccc_////_cccc_aaaa_pppp_aaaa_bbbb_iiii_llll_iiii_tttt_yyyy file:
  97.          _cccc_pppp_uuuu_uuuu_ssss_eeee_rrrr_1111_::::_aaaa_llll_llll_====_::::_aaaa_llll_llll_====
  98.  
  99.      You can not assign a user all capabilities with effective, inherited, and
  100.      permissive rights (_++++_eeee_iiii_pppp) added.  If you add _++++_eeee_iiii_pppp, the user will gain more
  101.      privileges than allowed by the Cpuset system.
  102.  
  103.      A Trusted IRIX user with a _cccc_pppp_uuuu_uuuu_ssss_eeee_rrrr_1111_::::_aaaa_llll_llll_====_::::_aaaa_llll_llll_==== entry in the
  104.      _////_eeee_tttt_cccc_////_cccc_aaaa_pppp_aaaa_bbbb_iiii_llll_iiii_tttt_yyyy file, has the same permissions as the user class in IRIX.
  105.  
  106.      The root class in Trusted IRIX must have the _CCCC_AAAA_PPPP______SSSS_CCCC_HHHH_EEEE_DDDD______MMMM_GGGG_TTTT_++++_eeee_iiii_pppp capability
  107.      to create and destroy cpusets and to move process out of the cpuset.
  108.  
  109.      In Trusted IRIX, you can use ACLs to control group permissions.  With
  110.      ACLs, you can easily select which users in the group can add a process to
  111.      the cpuset.  You can use ACLs to control a user's access to a cpuset
  112.      without that user belonging to the group owner of the configuration file.
  113.  
  114. OOOOPPPPTTTTIIIIOOOONNNNSSSS
  115.      ----qqqq _c_p_u_s_e_t__n_a_m_e  ----AAAA _c_o_m_m_a_n_d
  116.           Runs the command on the cpuset identified by the -q parameter.  If
  117.           the user does not have access permissions or the cpuset does not
  118.           exist, an error is returned.
  119.  
  120.      ----qqqq _c_p_u_s_e_t__n_a_m_e ----cccc ----ffff  _f_i_l_e_n_a_m_e
  121.           Creates a cpuset with the configuration file specified by the -f
  122.           parameter and the name specified by the -q parameter.  If the cpuset
  123.           name already exists, a CPU specified in the cpuset configuration
  124.           file is already a member of a cpuset, or the user does not have the
  125.           requisite permissions, the operation fails.
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ccccppppuuuusssseeeetttt((((1111))))                                                            ccccppppuuuusssseeeetttt((((1111))))
  137.  
  138.  
  139.  
  140.      ----qqqq _c_p_u_s_e_t__n_a_m_e ----llll
  141.           Lists all the processes in the cpuset.
  142.  
  143.      ----qqqq _c_p_u_s_e_t__n_a_m_e ----mmmm
  144.           Moves all the attached processes out of the cpuset.
  145.  
  146.      ----qqqq _c_p_u_s_e_t__n_a_m_e ----dddd
  147.           Destroys the specified cpuset.  A cpuset can only be destroyed if
  148.           there are no processes currently attached to it.
  149.  
  150.      ----qqqq _c_p_u_s_e_t__n_a_m_e ----QQQQ
  151.           Prints a list of the cpus that belong to the cpuset.
  152.  
  153.      ----qqqq _c_p_u_s_e_t__n_a_m_e ----pppp
  154.           Prints out the permissions, ACLs, MAC labels, flags, number of
  155.           processes and the cpus associated with the specified cpuset.
  156.  
  157.      ----qqqq _c_p_u_s_e_t__n_a_m_e,_c_p_u_s_e_t__n_a_m_e__d_e_s_t ----MMMM _s_u_b_o_p_t_i_o_n
  158.           The -M option moves a process or a group of processes and their
  159.           associated memory from cpuset_name to cpuset_name_dest.  The valid
  160.           suboptions are PID, ASH, JID, SID, and PGID indicate the id type to
  161.           be moved.  The -M option also requires the -i option.
  162.  
  163.      ----qqqq _c_p_u_s_e_t__n_a_m_e,_c_p_u_s_e_t__n_a_m_e__d_e_s_t ----TTTT _s_u_b_o_p_t_i_o_n
  164.           The -T option moves a proces or a group of processes but not their
  165.           memory from cpuset_name to cpuset_name_dest. The valid suboptions
  166.           PID, ASH, JID, SID, and PGID indicate the id type to be moved.  The
  167.           -T option also requires the -i option.
  168.  
  169.      ----qqqq _c_p_u_s_e_t__n_a_m_e,_c_p_u_s_e_t__n_a_m_e__d_e_s_t [[[[----MMMM |||| ----TTTT]]]] _s_u_b_o_p_t_i_o_n ----iiii _i_d
  170.           The -i option tells the command what id needs to be moved.
  171.  
  172.      ----CCCC   Prints the name of the cpuset to which the process is currently
  173.           attached.
  174.  
  175.      ----QQQQ   Lists the names of all the cpusets currently defined.
  176.  
  177.      ----hhhh   Print the command's usage message.
  178.  
  179. RRRREEEESSSSTTTTRRRRIIIICCCCTTTTIIIIOOOONNNNSSSS
  180.      A CPU can belong to at most one cpuset.
  181.  
  182.      CPU 0 cannot belong to an EXCLUSIVE cpuset.
  183.  
  184.      A CPU cannot be both restricted or isolated (see _m_p_a_d_m_i_n(1) and _s_y_s_m_p(2))
  185.      and also be a member of a cpuset.
  186.  
  187.      Only the superuser can create or destroy cpusets.
  188.  
  189.      Only the superuser can move all processes out of a cpuset (-m option).
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ccccppppuuuusssseeeetttt((((1111))))                                                            ccccppppuuuusssseeeetttt((((1111))))
  203.  
  204.  
  205.  
  206.      runon(1) can not run a command on a cpu that is part of a cpuset unless
  207.      the user has write or group write permission to access the cpuset's
  208.      configuration file.
  209.  
  210. DDDDEEEETTTTAAAAIIIILLLLSSSS
  211.      There is a tuneable system parameter, in the static parameter group,
  212.      mmmmiiiisssseeeerrrr called ccccppppuuuusssseeeetttt____nnnnoooobbbbiiiinnnndddd.... By default the boolean parameter is set to
  213.      '0' or false.  When this parameter is set to '1' (true), a further
  214.      restriction is placed upon processes scheduled by cpuset: If
  215.      cpuset_nobind == 1, Then nnnnoooo pppprrrroooocccceeeessssssss scheduled by cpuset may bind itself
  216.      or a child process to any cpu.  The request to bind to a cpu will be
  217.      refused and the error code set to EPERM. In addition a message will be
  218.      sent to the console and SYSLOG explaining the failure.
  219.  
  220. NNNNOOOOTTTTEEEESSSS
  221.      When using the -M or the -T options, the follwing items apply:
  222.  
  223.      +o    When moving processes out of a cpuset to the general cpu pool
  224.           (_g_l_o_b_a_l__c_p_u_s_e_t), use the value of 0 as the _d_e_s_t__c_p_u_s_e_t. Likewise,
  225.           use the value of 0 as the _s_o_u_r_c_e__c_p_u_s_e_t when moving processes from
  226.           the _g_l_o_b_a_l__c_p_u_s_e_t to a specific cpuset.
  227.  
  228.      +o    When using the -M or the -T options, JID is not available unless the
  229.           feature stream is being used and joblimits is installed.
  230.  
  231.      In a cluster environment, the cpuset configuration file should reside on
  232.      the root filesystem.  If the cpuset configuration file resides on a
  233.      filesystem other than the root filesystem and  you attempt to unmount the
  234.      filesystem, the vnode for the cpuset remains active and the _uuuu_nnnn_mmmm_oooo_uuuu_nnnn_tttt (see
  235.      _uuuu_nnnn_mmmm_oooo_uuuu_nnnn_tttt(1M) command fails.
  236.  
  237.      Make sure that your workload manager sets the configuration file to
  238.      reside on the root filesystem.
  239.  
  240. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  241.      mpadmin(1), runon(1), systune(1M), sysmp(2), boot_cpuset(4), cpuset(4),
  242.      cpuset(5).
  243.  
  244.      _I_R_I_X _A_d_m_i_n: _R_e_s_o_u_r_c_e _A_d_m_i_n_i_s_t_r_a_t_i_o_n
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.